(function () {
    'use strict';
    angular.module('module.business').config(configure);
    configure.$inject = ['$stateProvider'];

    function configure($stateProvider) {
        $stateProvider
            .state('home.record-unit', {
                url: 'record-unit',
                views: {
                    'content@': {
                        templateUrl: 'app/module/business/record/unit/record-unit.view.html',
                        controller: 'RecordUintController',
                        controllerAs:'recordUint',
                        resolve: {
                            deps: lazyLoadRecordUint
                        }
                    }
                },
                data: {
                    pageTitle: '备案单位信息',
                    requiresLogin: false
                }
            });
    }

    lazyLoadRecordUint.$injector = ['$ocLazyLoad'];

    function lazyLoadRecordUint($ocLazyLoad) {
        return $ocLazyLoad.load({
            name: 'module.business',
            insertBefore: '#ng_load_plugins_before',
            files: [
                'app/module/business/record/unit/record-unit.controller.js',
                'app/module/business/record/unit/record-unit.css',
                'app/module/business/record/unit/create/controller.js',
                'app/module/business/record/unit/detail/unit/controller.js',
                'app/module/business/record/unit/update/controller.js',
                'app/module/business/record/unit/alter/controller.js',
                'app/module/business/record/unit/detail/system/controller.js',
                'app/module/business/record/unit/upLoad.css',
                'app/module/business/record/unit/detail/alter/controller.js',
                'app/module/business/record/unit/detail/audit/controller.js'
            ]
        });
    }
})();